import request from '@/utils/request'
function getUrl(url) { return '/api/' + url }


//添加设备信息
export function addInEquipment(data) {
    return request({
        url: getUrl("admin/equipment/addInEquipment"),
        method: 'post',
        data
    })
}

//更新设备信息
export function updateInEquipment(data) {
    return request({
        url: getUrl("admin/equipment/updateInEquipment"),
        method: 'post',
        data
    })
}

//刪除设备信息数据
export function deleteInEquipment(data) {
    return request({
        url: getUrl("admin/equipment/deleteInEquipment"),
        method: 'post',
        data
    })
}


//获取设备数据 getInEquipmentVo
export function getInEquipmentVo(data) {
    return request({
        url: getUrl("admin/equipment/getInEquipmentVo"),
        method: 'post',
        data
    })
}

//获取设备列表数据信息  getEquipmentList
export function getEquipmentList(data) {
    return request({
        url: getUrl("admin/equipment/getEquipmentList"),
        method: 'post',
        data
    })
}

export function getLevelEquipmentList(data) {
    return request({
        url: getUrl("admin/equipment/getLevelEquipmentList"),
        method: 'post',
        data
    })
}

//获取巡检详情信息数据 getInspectionVo
export function getInspectionVo(data) {
    return request({
        url: getUrl("admin/equipment/getInspectionVo"),
        method: 'post',
        data
    })
}

//根据设备获取巡检人员列表 getInspectionUserList
export function getInspectionUserList(data) {
    return request({
        url: getUrl("admin/equipment/getInspectionUserList"),
        method: 'post',
        data
    })
}

//添加设备巡检信息
export function addInspection(data) {
    return request({
        url: getUrl("admin/equipment/addInspection"),
        method: 'post',
        data
    })
}

//更新设备巡检信息
export function updateInspection(data) {
    return request({
        url: getUrl("admin/equipment/updateInspection"),
        method: 'post',
        data
    })
}

// 批量设置维保周期
export function updateDatas(data){
    return request({
        url: getUrl("admin/equipment/updateDatas"),
        method: 'post',
        data
    })
}


export function deleteInspection(data) {
    return request({
        url: getUrl("admin/equipment/deleteInspection"),
        method: 'post',
        data
    })
}
//获取监测设备设备列表数据信息  getEquipmentList
export function getJcEquipmentData(data) {
    return request({
        url: getUrl("admin/equipment/getMeasuringEquipmentList"),
        method: 'post',
        data
    })
}
export function getAllJcEquipment(data) {
    return request({
        url: getUrl("admin/equipment/getAllJcEquipment"),
        method: 'get',
        data
    })
}


//获取数据表里的设备实时数据列表数据信息
export function getEquipmentRealtimeValue(data) {
    return request({
        url: getUrl("admin/equipment/getEquipmentRealtimeValue"),
        method: 'post',
        data
    })
}

export function logoDrill(data) {
    return request({
        url: getUrl("admin/equipment/logoDrill"),
        method: 'post',
        data
    })
}


export function generateDirll(data) {
    return request({
        url: getUrl("admin/equipment/generateDirll"),
        method: 'post',
        data
    })
}

export function endDrill(data) {
    return request({
        url: getUrl("admin/equipment/endDrill"),
        method: 'post',
        data
    })
}

//模拟触发主机设备
export function triggerEqu(data) {
    return request({
        url: getUrl("admin/equipment/triggerEqu"),
        method: 'post',
        data
    })
}

export function getInMeasuringEquipmentVo(data) {
    return request({
        url: getUrl("admin/equipment/getInMeasuringEquipmentVo"),
        method: 'post',
        data
    })
}


export function getInMeasuringDatePage(data) {
    return request({
        url: getUrl("admin/equipment/getInMeasuringDatePage"),
        method: 'post',
        data
    })
}

export function getInMeasuringDateList(data) {
    return request({
        url: getUrl("admin/equipment/getMeasuringDateList"),
        method: 'post',
        data
    })
}


//添加检测设备信息
export function addInMeasuringEquipment(data) {
    return request({
        url: getUrl("admin/equipment/addInMeasuringEquipment"),
        method: 'post',
        data
    })
}

//更新检测设备信息
export function updateInMeasuringEquipment(data) {
    return request({
        url: getUrl("admin/equipment/updateInMeasuringEquipment"),
        method: 'post',
        data
    })
}

//刪除检测设备信息数据
export function deleteInMeasuringEquipment(data) {
    return request({
        url: getUrl("admin/equipment/deleteInMeasuringEquipment"),
        method: 'post',
        data
    })
}
export function queryMeasrData(data) {
    return request({
        url: getUrl("admin/equipment/queryMeasrData"),
        method: 'post',
        data
    })
}



